const express = require('express');
const {
    httpGetAllLaunches,
    httpAddNewLaunch,
    httpAbortLaunch,
   } = require('./launches.controller');
// 创建 launchesRouter 路由器实例
const launchesRouter = express.Router();
// 为 launchesRouter 路由器实例添加 GET 请求处理⽅法
launchesRouter.get('/', httpGetAllLaunches);
launchesRouter.post('/', httpAddNewLaunch);
// 为 launchesRouter 路由器实例添加 DELETE 请求处理⽅法
launchesRouter.delete('/:id', httpAbortLaunch);
module.exports = launchesRouter;